package com.lr.design.pattern.creational.abstractfactory;

/**
 * Created by geely
 *
 * 抽象工厂模式
 *
 *
 *
 */
public class Test {
    public static void main(String[] args) {
        CourseFactory courseFactory = new JavaCourseFactory();
        Video video = courseFactory.getVideo();
        Article article = courseFactory.getArticle();
        video.produce();
        article.produce();

        CourseFactory pythonCourseFactory = new PythonCourseFactory();
        Video video1 = pythonCourseFactory.getVideo();
        Article article1 = pythonCourseFactory.getArticle();
        video1.produce();
        article1.produce();
    }
}
